/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.mzk.oai.metadataRepository.cli;

import cz.mzk.oai.metadataRepository.harvest.tei.TeiHarvester;
import cz.mzk.oai.metadataRepository.harvest.tei.svn.TeiSvnHarvester;
import cz.mzk.oai.metadataRepository.metadata.DateStamp;
import cz.mzk.oai.metadataRepository.repository.Repository;
import java.util.Properties;

/**
 *
 * @author Martin Řehánek (rehan at mzk.cz)
 */
public class HarvestTeiNewAction extends AbstractHarvestTeiAction {

    private final DateStamp from;

    public HarvestTeiNewAction(Repository repository, Properties properties, String daysAgo) {
        super(repository, properties);
        from = DateStamp.daysAgo(Integer.parseInt(daysAgo));
    }

    @Override
    public void run() throws Exception {
        TeiHarvester harvester = new TeiSvnHarvester(repository, url, mappingFile);
        harvester.harvest(from, null);
    }
}
